import request from '@/utils/request'

export function fetchAdList(query) {
  return request({
    url: '/XinMiao_MS/ad/list',
    method: 'get',
    params: query
  })
}

export function fetchAd(id) {
  return request({
    url: '/XinMiao_MS/ad/detail',
    method: 'get',
    params: { id }
  })
}


export function createAd(data) {
  return request({
    url: '/XinMiao_MS/ad/create',
    method: 'post',
    data
  })
}

export function updateAd(data) {
  return request({
    url: '/XinMiao_MS/ad/update',
    method: 'post',
    data
  })
}
